package org.tissou.client.Services;

import com.google.gwt.user.client.rpc.ServiceDefTarget;
import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.core.client.GWT;
import org.tissou.client.Services.CategorieInfos;

/**
 * Created by IntelliJ IDEA.
 * User: Manu
 * Date: 14 mars 2009
 * Time: 18:04:49
 * To change this template use File | Settings | File Templates.
 */
public interface CategorieService extends RemoteService {
    /**
     * Utility/Convenience class.
     * Use CategorieService.App.getInstance() to access static instance of CategorieServiceAsync
     */
    public static class App {
        private static final CategorieServiceAsync ourInstance;

        static {
            ourInstance = (CategorieServiceAsync) GWT.create(CategorieService.class);
            ((ServiceDefTarget) ourInstance).setServiceEntryPoint(GWT.getModuleBaseURL() + "categorie");
        }

        public static CategorieServiceAsync getInstance() {
            return ourInstance;
        }
    }

    public CategorieInfos donneCategorie(String nomApproximatif);
}
